export default class People{
    constructor(name,age){
        // this.viparr=['小王',"小李","小张"]
        this.name=name
        this.age=age
        // this.say()
        this.getVip()
    }

    static author = ['小王',"小李","小张"]; // 静态属性

    #attr = 10; // 私有属性
    //静态方法
    //普通方法
    say(){
        console.log(10, this.viparr);
        console.log('hellow'+this.name);
    }
     // 静态方法，判断是否为vip用户
    static isVip(name) {
        console.log('我是静态方法');
        return this.author.includes(name) ? "Vip用户" : "新用户"; // 从实例方法
        
      }
      getVip(){
        console.log(25,this.author);
        // People.isVip(this)
      }
      // 静态方法，获取品牌折扣价
      static dPrice(price) {
        return price > 10 ? price * 0.9 : price * 0.95;
      }
    
}

